package com.lx.input.flatFile;

import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author lixing
 * @date 2021/7/12 19:32
 */
@Component("flatFileWriterDemo")
public class FlatFileWriterDemo implements ItemWriter<AlipayTranDo> {

    @Override
    public void write(List<? extends AlipayTranDo> items) throws Exception {
        System.out.println("开始打印数据：");
        for(AlipayTranDo alipayTranDo:items) {
            System.out.println(alipayTranDo);
        }
        System.out.println("数据打印结束");
    }

}
